package com.asteros.crypto.ui.applet;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JApplet;
import javax.swing.SwingUtilities;

import com.asteros.crypto.config.AppConfig;
import com.asteros.crypto.ui.swing.MainPanel;

public final class SignerApplet extends JApplet implements ActionListener
{
	public void init()
	{
		System.out.println("SignerApplet.init");
		
		AppConfig.getInstance().defaultClientInit();
		try
		{
			SwingUtilities.invokeAndWait(new Runnable() {
				public void run() { SignerApplet.this.createGUI(); } } );
		}
		catch (Exception e) {
			System.err.println("createGUI didn't successfully complete");
		}
	}

	private void createGUI()
	{
		MainPanel pane = new MainPanel();
		add(pane);
	}

	public void actionPerformed(ActionEvent e)
	{
		System.out.println("actionPerformed!!!");
	}
}
